REM Set BUILDVSPROJECT=1 in OS Environment Properties to force build (rebuild) of VS Projects

Set BUILDVSPROJECT=1
set VisualStudioVersion=12.0

if NOT %BUILDVSPROJECT%_XX==1_XX GOTO DONTBUILD

set AppName=Compact13TaskManager

set VSProjectFileName=%AppName%VS.csproj
set VSProjectLocation=.

IF NOT EXIST %VSProjectLocation% GOTO DONTBUILD

PUSHD %VSProjectLocation%

IF NOT EXIST %VSProjectFileName% GOTO SKIPBUILD

call "C:\Program Files (x86)\Microsoft Visual Studio %VisualStudioVersion%\Common7\Tools\VsDevCmd.bat"
msbuild %VSProjectFileName%  /t:Rebuild /p:Configuration=Release

:SKIPBUILD

POPD

:DONTBUILD